/**
 * @Author: hcc
 * @Date: 2022-04-08
 * @Last Modified by: hcc
 * @Last Modified time: 2022-04-08
 */
const RouteView = () => import('@/layout/RouteView');
// 异步路由组件加载
const AsyncComponent = __name__ => () => import(`@/pages/${__name__}`);

// 菜单路由
const menuRoutes = [{
  path: '/dealerSaleP',
  meta: {
    title: '销售管理',
    icon: 'el-icon-s-operation'
  },
  redirect: '/dealerSaleP/DealerDaily',
  component: RouteView,
  children: [
    {
      path: '/dealerSaleP/OrderManagement',
      meta: {
        title: '订单管理'
      },
      redirect: '/dealerSaleP/OrderManagement',
      component: RouteView,
      children: [
        {
          path: '/dealerSaleP/OrderManagement/OrderSubmission',
          meta: {
            title: '增补订单提报',
            keepAlive: true
          },
          component: AsyncComponent('dealerSaleP/OrderManagement/OrderSubmission')
        },
        {
          path: '/dealerSaleP/OrderManagement/OrderQuery',
          meta: {
            title: '订单查看',
            keepAlive: true
          },
          component: AsyncComponent('dealerSaleP/OrderManagement/OrderQuery')
        },
        {
          path: '/dealerSaleP/OrderManagement/OrderDetailQuery',
          meta: {
            title: '订单明细查询',
            keepAlive: true
          },
          component: AsyncComponent('dealerSaleP/OrderManagement/OrderDetailQuery')
        }
      ]
    },
    {
      path: '/dealerSaleP/KeyCustomers',
      meta: {
        title: '大客户订单管理'
      },
      redirect: '/dealerSaleP/KeyCustomers',
      component: RouteView,
      children: [
        {
          path: '/dealerSaleP/KeyCustomers/OrderSubmission',
          meta: {
            title: '大客户订单提报',
            keepAlive: true
          },
          component: AsyncComponent('dealerSaleP/KeyCustomers/OrderSubmission')
        },
        {
          path: '/dealerSaleP/KeyCustomers/OrderQuery',
          meta: {
            title: '大客户订单查询',
            keepAlive: true
          },
          component: AsyncComponent('dealerSaleP/KeyCustomers/OrderQuery')
        }
      ]
    },
  ]
}];
export default menuRoutes;
